From 579f457c78d52b09ba3b6aa238f99c6914ae8d26 Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Wed, 21 Jan 2009 20:09:49 +0000 Subject: [PATCH] =?utf8?q?=20=20=20=20=20=20=20Bug=20568552=20=E2=80=93=20?= =?utf8?q?gtk=5Fcombo=20+=20gtk=20entry=20in=20invisible=20mode=20takes=20?= =?utf8?q?100%=20cpu?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit * gtk/gtkentry.c: Fix an expose loop caused by raising windows out of an expose handler. Also, don't show the 'Caps Lock' warning for activated input methods, since that makes it permanently shown for some locales. It should not be that necessary, now that we do show preedit text even in password entries. Pointed out by Frederic Crozat. svn path=/trunk/; revision=22164 --- ChangeLog | 12 ++++++++++++ gtk/gtkentry.c | 26 ++++++++------------------ 2 files changed, 20 insertions(+), 18 deletions(-) diff --git a/ChangeLog b/ChangeLog index 44e91fd958..cf0d72b8c7 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,14 @@ +2009-01-21 Matthias Clasen + + Bug 568552 – gtk_combo + gtk entry in invisible mode takes 100% cpu + + * gtk/gtkentry.c: Fix an expose loop caused by raising windows out + of an expose handler. Also, don't show the 'Caps Lock' warning for + activated input methods, since that makes it permanently shown + for some locales. It should not be that necessary, now that we + do show preedit text even in password entries. Pointed out by + Frederic Crozat. + 2009-01-21 Federico Mena Quintero * gtk/gtkfilechooserdefault.c (save_widgets_create): Set @@ -6,6 +17,7 @@ exists. 2009-01-21 Marek Kasik + Bug 561801 - "scheduled printing" doesn't function as expected * gtk/gtkprintunixdialog: Add tooltip. diff --git a/gtk/gtkentry.c b/gtk/gtkentry.c index 6ed922332f..cda22297d3 100644 --- a/gtk/gtkentry.c +++ b/gtk/gtkentry.c @@ -799,8 +799,7 @@ gtk_entry_class_init (GtkEntryClass *class) /** * GtkEntry:caps-lock-warning * - * Whether password entries will show a warning when Caps Lock is on - * or an input method is active. + * Whether password entries will show a warning when Caps Lock is on. * * Note that the warning is shown using a secondary icon, and thus * does not work if you are using the secondary icon position for some @@ -812,7 +811,7 @@ gtk_entry_class_init (GtkEntryClass *class) PROP_CAPS_LOCK_WARNING, g_param_spec_boolean ("caps-lock-warning", P_("Caps Lock warning"), - P_("Whether password entries will show a warning when Caps Lock is on or an input method is active"), + P_("Whether password entries will show a warning when Caps Lock is on"), TRUE, GTK_PARAM_READWRITE)); @@ -2434,7 +2433,7 @@ update_cursors (GtkWidget *widget) if ((icon_info = priv->icons[i]) != NULL) { if (icon_info->pixbuf != NULL) - gdk_window_show (icon_info->window); + gdk_window_show_unraised (icon_info->window); /* The icon windows are not children of the visible entry window, * thus we can't just inherit the xterm cursor. Slight complication @@ -2515,7 +2514,7 @@ construct_icon_info (GtkWidget *widget, realize_icon_info (widget, icon_pos); if (GTK_WIDGET_MAPPED (widget)) - gdk_window_show (icon_info->window); + gdk_window_show_unraised (icon_info->window); return icon_info; } @@ -6305,9 +6304,9 @@ gtk_entry_ensure_pixbuf (GtkEntry *entry, g_assert_not_reached (); break; } - - if (GDK_IS_WINDOW (icon_info->window)) - gdk_window_show (icon_info->window); + + if (icon_info->pixbuf != NULL) + gdk_window_show_unraised (icon_info->window); } @@ -9598,17 +9597,8 @@ keymap_state_changed (GdkKeymap *keymap, if (!entry->visible && priv->caps_lock_warning) { - gboolean capslock_on; - gboolean im_on; - - capslock_on = gdk_keymap_get_caps_lock_state (keymap); - im_on = g_strcmp0 (gtk_im_multicontext_get_context_id (GTK_IM_MULTICONTEXT (entry->im_context)), "gtk-im-context-simple") != 0; - if (capslock_on && im_on) - text = _("You have the Caps Lock key on\nand an active input method"); - else if (capslock_on) + if (gdk_keymap_get_caps_lock_state (keymap)) text = _("You have the Caps Lock key on"); - else if (im_on) - text = _("You have an active input method"); } if (text) -- 2.30.2